Skip to content

Conversation

hanouticelina
Copy link
Contributor

Related to https://github.com/huggingface-internal/moon-landing/pull/14572 (private) and huggingface/huggingface.js#1761.

This PR removes the client-side check to /api/{repo_type}s/{repo_id}?expand[]=xetEnabled to know if xet is enabled when uploading, transfer selection is now determined by the server via the Git LFS Batch API. the negotiated transfer (basic, multipart or xet) is known only once we've queried the batch API. the client tells the server when xet is supported (if hf-xet is available, the input is not a BytesIO, and HF_HUB_DISABLE_XET is not set to 1.

Comment on lines -317 to +366
class TestXetE2E(TestXetUpload):
@pytest.mark.usefixtures("xet_setup")
class TestXetE2E:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the PR but i realized we were running TestXetUpload twice with this inheritance 🙃 fixed it here

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

# - the files are provided as str or paths objects,
# - the library is installed.
# Otherwise, default back to LFS.
xet_enabled = self.repo_info(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of this to remove this call 😄



@pytest.fixture
def xet_setup(request, tmp_path):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean!

@hanouticelina hanouticelina merged commit ae08790 into main Sep 23, 2025
25 checks passed
@hanouticelina hanouticelina deleted the use-xet-transfer-in-lfs-calls branch September 23, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants